//
//  TZSetCellModel.m
//  wangYiLottery
//
//  Created by mac on 16/2/28.
//  Copyright © 2016年 tz. All rights reserved.
//

#import "TZSetCellModel.h"
#import "TZSetItemsModel.h"
@implementation TZSetCellModel
- (instancetype)initWithDict:(NSDictionary *)dict
{
    self = [super init];
    if (self) {
        self.footer = dict[@"footer"];
        self.header = dict[@"header"];
        NSArray *itemsArray = dict[@"items"];
        NSMutableArray *mArray = [NSMutableArray arrayWithCapacity:itemsArray.count];
        
        for (NSDictionary *dict in itemsArray) {
            TZSetItemsModel *model = [TZSetItemsModel setItemsDict:dict];
            [mArray addObject:model];
        }
        self.items = mArray;
    }
    return self;
}

+ (instancetype)setCellWithDict:(NSDictionary *)dict {
    return [[self alloc] initWithDict:dict];
}
@end
